package com.sino.operation.util;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * TOD
 *
 * @author Administrator
 * date 2021/10/22 0022 0:21
 */
public class TimeUtil {
    public static String getStandardTime(){
       return DateTimeFormatter.ofPattern("yyyyMMdd HH:mm:ss").format(LocalDateTime.now());
    }

    public static String getDateTime(){
        return DateTimeFormatter.ofPattern("yyyyMMdd").format(LocalDateTime.now());
    }

    public static String getTimestamp(){
        return DateTimeFormatter.ofPattern("HH:mm:ss").format(LocalDateTime.now());
    }

    public static String getCustom(String custom){
        return DateTimeFormatter.ofPattern(custom).format(LocalDateTime.now());
    }
}
